<!DOCTYPE html>

<html lang="en" data-content_root="../">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />

  <title>SKIP_LINTING &mdash; CMake 4.1.1 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a2c47e09" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css?v=4d06bd55" />
    
    <script src="../_static/documentation_options.js?v=e6a937a4"></script>
    <script src="../_static/doctools.js?v=9bcbadda"></script>
    <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
    
    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="SKIP_PRECOMPILE_HEADERS" href="SKIP_PRECOMPILE_HEADERS.html" />
    <link rel="prev" title="SKIP_AUTOUIC" href="SKIP_AUTOUIC.html" />
 

  </head><body>
    <input id="sidebar-check" type="checkbox" />
    <label id="sidebar-overlay" for="sidebar-check"></label>



    <div class="related relbar1" role="navigation" aria-label="Related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="SKIP_PRECOMPILE_HEADERS.html" title="SKIP_PRECOMPILE_HEADERS"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="SKIP_AUTOUIC.html" title="SKIP_AUTOUIC"
             accesskey="P">previous</a> |</li>
  <li>
    <label class="sidebar-toggle" for="sidebar-check"></label>
  </li>
  <li class="rootlink">
    <img src="../_static/cmake-logo-16.png" width="16" height="16" alt=""/>
    <a href="https://cmake.org/">CMake 4.1.1</a>
    <span class="reldelim1"> &#187;</span>
  </li>
  <li>
    <a href="../index.html">Documentation</a> &#187;
  </li>

          <li class="nav-item nav-item-1"><a href="../manual/cmake-properties.7.html" accesskey="U">cmake-properties(7)</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">SKIP_LINTING</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="skip-linting">
<span id="prop_sf:SKIP_LINTING"></span><h1>SKIP_LINTING<a class="headerlink" href="#skip-linting" title="Link to this heading">¶</a></h1>
<div class="versionadded">
<p><span class="versionmodified added">Added in version 3.27.</span></p>
</div>
<p>This property allows you to exclude a specific source file
from the linting process. The linting process involves running
tools such as <span class="target" id="index-0-prop_tgt:&lt;LANG&gt;_CPPLINT"></span><a class="reference internal" href="../prop_tgt/LANG_CPPLINT.html#prop_tgt:&lt;LANG&gt;_CPPLINT" title="&lt;LANG&gt;_CPPLINT"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">&lt;LANG&gt;_CPPLINT</span></code></a>, <span class="target" id="index-0-prop_tgt:&lt;LANG&gt;_CLANG_TIDY"></span><a class="reference internal" href="../prop_tgt/LANG_CLANG_TIDY.html#prop_tgt:&lt;LANG&gt;_CLANG_TIDY" title="&lt;LANG&gt;_CLANG_TIDY"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">&lt;LANG&gt;_CLANG_TIDY</span></code></a>,
<span class="target" id="index-0-prop_tgt:&lt;LANG&gt;_CPPCHECK"></span><a class="reference internal" href="../prop_tgt/LANG_CPPCHECK.html#prop_tgt:&lt;LANG&gt;_CPPCHECK" title="&lt;LANG&gt;_CPPCHECK"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">&lt;LANG&gt;_CPPCHECK</span></code></a>, <span class="target" id="index-0-prop_tgt:&lt;LANG&gt;_ICSTAT"></span><a class="reference internal" href="../prop_tgt/LANG_ICSTAT.html#prop_tgt:&lt;LANG&gt;_ICSTAT" title="&lt;LANG&gt;_ICSTAT"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">&lt;LANG&gt;_ICSTAT</span></code></a> and
<span class="target" id="index-0-prop_tgt:&lt;LANG&gt;_INCLUDE_WHAT_YOU_USE"></span><a class="reference internal" href="../prop_tgt/LANG_INCLUDE_WHAT_YOU_USE.html#prop_tgt:&lt;LANG&gt;_INCLUDE_WHAT_YOU_USE" title="&lt;LANG&gt;_INCLUDE_WHAT_YOU_USE"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">&lt;LANG&gt;_INCLUDE_WHAT_YOU_USE</span></code></a> on the source files, as well
as compiling header files as part of <span class="target" id="index-0-prop_tgt:VERIFY_INTERFACE_HEADER_SETS"></span><a class="reference internal" href="../prop_tgt/VERIFY_INTERFACE_HEADER_SETS.html#prop_tgt:VERIFY_INTERFACE_HEADER_SETS" title="VERIFY_INTERFACE_HEADER_SETS"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">VERIFY_INTERFACE_HEADER_SETS</span></code></a>.
By setting <code class="docutils literal notranslate"><span class="pre">SKIP_LINTING</span></code> on a source file, the mentioned linting tools
will not be executed for that particular file.</p>
<section id="example">
<h2>Example<a class="headerlink" href="#example" title="Link to this heading">¶</a></h2>
<p>Consider a C++ project that includes multiple source files,
such as <code class="docutils literal notranslate"><span class="pre">main.cpp</span></code>, <code class="docutils literal notranslate"><span class="pre">things.cpp</span></code>, and <code class="docutils literal notranslate"><span class="pre">generatedBindings.cpp</span></code>.
In this example, you want to exclude the <code class="docutils literal notranslate"><span class="pre">generatedBindings.cpp</span></code>
file from the linting process. To achieve this, you can utilize
the <code class="docutils literal notranslate"><span class="pre">SKIP_LINTING</span></code> property with the <span class="target" id="index-0-command:set_source_files_properties"></span><a class="reference internal" href="../command/set_source_files_properties.html#command:set_source_files_properties" title="set_source_files_properties"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">set_source_files_properties()</span></code></a>
command as shown below:</p>
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_executable(</span><span class="nb">MyApp</span><span class="w"> </span><span class="nb">main.cpp</span><span class="w"> </span><span class="nb">things.cpp</span><span class="w"> </span><span class="nb">generatedBindings.cpp</span><span class="nf">)</span>

<span class="nf">set_source_files_properties(</span><span class="nb">generatedBindings.cpp</span><span class="w"> </span><span class="no">PROPERTIES</span>
<span class="w">    </span><span class="no">SKIP_LINTING</span><span class="w"> </span><span class="no">ON</span>
<span class="nf">)</span>
</pre></div>
</div>
<p>In the provided code snippet, the <code class="docutils literal notranslate"><span class="pre">SKIP_LINTING</span></code> property is set to true
for the <code class="docutils literal notranslate"><span class="pre">generatedBindings.cpp</span></code> source file. As a result, when the linting
tools specified by <span class="target" id="index-1-prop_tgt:&lt;LANG&gt;_CPPLINT"></span><a class="reference internal" href="../prop_tgt/LANG_CPPLINT.html#prop_tgt:&lt;LANG&gt;_CPPLINT" title="&lt;LANG&gt;_CPPLINT"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">&lt;LANG&gt;_CPPLINT</span></code></a>, <span class="target" id="index-1-prop_tgt:&lt;LANG&gt;_CLANG_TIDY"></span><a class="reference internal" href="../prop_tgt/LANG_CLANG_TIDY.html#prop_tgt:&lt;LANG&gt;_CLANG_TIDY" title="&lt;LANG&gt;_CLANG_TIDY"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">&lt;LANG&gt;_CLANG_TIDY</span></code></a>,
<span class="target" id="index-1-prop_tgt:&lt;LANG&gt;_CPPCHECK"></span><a class="reference internal" href="../prop_tgt/LANG_CPPCHECK.html#prop_tgt:&lt;LANG&gt;_CPPCHECK" title="&lt;LANG&gt;_CPPCHECK"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">&lt;LANG&gt;_CPPCHECK</span></code></a>, <span class="target" id="index-1-prop_tgt:&lt;LANG&gt;_ICSTAT"></span><a class="reference internal" href="../prop_tgt/LANG_ICSTAT.html#prop_tgt:&lt;LANG&gt;_ICSTAT" title="&lt;LANG&gt;_ICSTAT"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">&lt;LANG&gt;_ICSTAT</span></code></a> or
<span class="target" id="index-1-prop_tgt:&lt;LANG&gt;_INCLUDE_WHAT_YOU_USE"></span><a class="reference internal" href="../prop_tgt/LANG_INCLUDE_WHAT_YOU_USE.html#prop_tgt:&lt;LANG&gt;_INCLUDE_WHAT_YOU_USE" title="&lt;LANG&gt;_INCLUDE_WHAT_YOU_USE"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">&lt;LANG&gt;_INCLUDE_WHAT_YOU_USE</span></code></a> are executed, they will skip analyzing
the <code class="docutils literal notranslate"><span class="pre">generatedBindings.cpp</span></code> file.</p>
<p>By using the <code class="docutils literal notranslate"><span class="pre">SKIP_LINTING</span></code> property, you can selectively exclude specific
source files from the linting process. This allows you to focus the
linting tools on the relevant parts of your project, enhancing the efficiency
and effectiveness of the linting workflow.</p>
</section>
</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="Main">
        <div class="sphinxsidebarwrapper">
  <div>
    <h3>Table of Contents</h3>
    <ul>
<li><a class="reference internal" href="#">SKIP_LINTING</a><ul>
<li><a class="reference internal" href="#example">Example</a></li>
</ul>
</li>
</ul>

  </div>
  <div>
    <h4>Previous topic</h4>
    <p class="topless"><a href="SKIP_AUTOUIC.html"
                          title="previous chapter">SKIP_AUTOUIC</a></p>
  </div>
  <div>
    <h4>Next topic</h4>
    <p class="topless"><a href="SKIP_PRECOMPILE_HEADERS.html"
                          title="next chapter">SKIP_PRECOMPILE_HEADERS</a></p>
  </div>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/prop_sf/SKIP_LINTING.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<search id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="Related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="SKIP_PRECOMPILE_HEADERS.html" title="SKIP_PRECOMPILE_HEADERS"
             >next</a> |</li>
        <li class="right" >
          <a href="SKIP_AUTOUIC.html" title="SKIP_AUTOUIC"
             >previous</a> |</li>
  <li>
    <label class="sidebar-toggle" for="sidebar-check"></label>
  </li>
  <li class="rootlink">
    <img src="../_static/cmake-logo-16.png" width="16" height="16" alt=""/>
    <a href="https://cmake.org/">CMake 4.1.1</a>
    <span class="reldelim1"> &#187;</span>
  </li>
  <li>
    <a href="../index.html">Documentation</a> &#187;
  </li>

          <li class="nav-item nav-item-1"><a href="../manual/cmake-properties.7.html" >cmake-properties(7)</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">SKIP_LINTING</a></li> 
      </ul>
    </div>

    <div class="footer" role="contentinfo">
    &#169; Copyright 2000-2025 Kitware, Inc. and Contributors.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.
    </div>
<script type="text/javascript">
(function() {
  "use strict";
  const hide = () => document.getElementById("sidebar-check").checked = false;
  addEventListener("keydown", e => (e.key === "Escape") && hide());
  addEventListener("click", e => (e.target.tagName === "A") && hide());
  addEventListener("hashchange", hide)
})();
</script>
  </body>
</html>